package com.example.network;


import android.app.ProgressDialog;
import android.content.Context;

import com.example.rzprogram.R;

/**
 * 
 */
/**
 * 
 * 作者:	Rose
 * 业务名: Dialog工具类
 * 功能说明: 请求加载Dialog封装类
 * 编写日期:	2014-11-6
 *
 */
public class ProgressDialogUtil {

	private static ProgressDialog pgsDialog = null;

	public static void showDialog(Context ctx) {
		pgsDialog = new ProgressDialog(ctx);
		pgsDialog.setCancelable(false);
		pgsDialog.setMessage(ctx.getResources().getString(R.string.wait));
		pgsDialog.setCanceledOnTouchOutside(true);
		pgsDialog.show();
	}

	public static void closeDialog() {
		if (pgsDialog != null) {
			pgsDialog.dismiss();
			pgsDialog = null;
		}
	}

}
